<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>Select</title>
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200'><link rel="stylesheet" href="./style.css">

</head>
<body>
<!-- partial:index.partial.html -->
<div id="app" class="wrapper">
  <div class="title">
    VUE💚 select
    <div class="line"></div>
  </div>
  <div class="container">
    <div class="card">
      <div class="select">
          <div class="label">Primary select</div>
          <div @click="toggleSelect" class="button">
            <span v-if="!selected.value">
              Select
            </span>
            <span v-else>
              {{ selected.text }}
            </span>
            <span class="icon material-symbols-outlined" :class="show ? 'close' : ''">expand_more</span>
          </div>
          <div :class="`select-block ${show ? 'open': ''}`">
            <div class="scroll">
              <ul>
                <li v-for="item in items" :key='item.value' @click="clickItem(item)" :class="item.value === selected.value ? 'active' : ''">{{ item.text }}</li>
              </ul>
            </div>
          </div>
    
        <div v-if="show" @click="toggleSelect" class="select-wrapper"></div>
      </div>
      
    </div>
  </div>
</div>
<!-- partial -->
  <script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.7.8/vue.min.js'></script><script  src="./script.js"></script>

</body>
</html>
